Schema as versioning strategy - Mailing list pgsql-general

From Owen Hartnett
Subject Schema as versioning strategy
Date
Msg-id p06230900c25534883ada@[192.168.0.109]
Whole thread Raw
In response to Re: Vacuum-full very slow  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: Schema as versioning strategy  (Richard Huxton <dev@archonet.com>)
Re: Schema as versioning strategy  (Reece Hart <reece@harts.net>)
Re: Schema as versioning strategy  (Alban Hertroys <alban@magproductions.nl>)
List pgsql-general
Hi:

I'm a new user of Postgresql (8.2.3), and I'm very happy with both
the performance and operation of the system.  My compliments to you
the many authors who keep this database running and useful.

My question is:

I want to "freeze" a snapshot of the database every year (think of
end of year tax records).  However, I want this frozen version (and
all the previous frozen versions) available to the database user as
read-only.  My thinking is to copy the entire public schema (which is
where all the current data lives) into a new schema, named 2007
(2008, etc.)

Is this a valid plan.  I had thought of using a different database,
but that would require multiple opens.  I looked to see if there were
an easy way to script doing an exact schema copy, but I haven't found
anything like it in the docs.

This is not heavy usage, nor is there a large amount of data (current
pg_dump backups are around 30 Megabytes.

Am I on the right track, or would you suggest a different strategy?

-Owen

Clipboard, Inc.

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Vacuum-full very slow
Next
From: "Marcelo de Moraes Serpa"
Date:
Subject: Re: Audit-trail engine: getting the application's layer user_id